package com.fgs.common.api;


/**
 * @author fgs
 * @date 2020/10/10
 * @description
 **/
public class CommonOptions {
    private String baseUrl;
    private String baseImageUrl;
    private String baseWebUrl;
    private String apkUrl;
    private Class mainClass;


    private CommonOptions(Builder builder) {
        baseUrl = builder.baseUrl;
        baseImageUrl = builder.baseImageUrl;
        baseWebUrl = builder.baseWebUrl;
        apkUrl = builder.apkUrl;
        mainClass = builder.mainClass;
    }

    public String getBaseUrl() {
        return baseUrl;
    }

    public String getBaseImageUrl() {
        return baseImageUrl;
    }

    public String getBaseWebUrl() {
        return baseWebUrl;
    }

    public String getApkUrl() {
        return apkUrl;
    }

    public Class getMainClass() {
        return mainClass;
    }


    public static Builder builder() {
        return new Builder();
    }

    public static final class Builder {
        private String baseUrl;
        private String baseImageUrl;
        private String baseWebUrl;
        private String apkUrl;
        private Class mainClass;

        private Builder() {
        }

        public Builder baseUrl(String baseUrl) {
            this.baseUrl = baseUrl;
            return this;

        }

        public Builder baseImageUrl(String baseImageUrl) {
            this.baseImageUrl = baseImageUrl;
            return this;

        }

        public Builder baseWebUrl(String baseWebUrl) {
            this.baseWebUrl = baseWebUrl;
            return this;

        }

        public Builder apkUrl(String apkUrl) {
            this.apkUrl = apkUrl;
            return this;
        }

        public Builder mainClass(Class mainClass) {
            this.mainClass = mainClass;
            return this;
        }


        public CommonOptions build() {
            return new CommonOptions(this);
        }

    }
}
